//
//  BaseView.m
//  ShangChengMoBan
//
//  Created by 张铁军 on 16/8/16.
//  Copyright © 2016年 ping. All rights reserved.
//

#import "BaseView.h"

@implementation BaseView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self ksc];
    }
    
    return self;
}

-(void)ksc{
    if (KScreenHeight == 480 ) {
        _kscH = 1;
        _kscW = 1;
    }
    else
    {
        _kscH = KScreenHeight / 568;
        _kscW = KScreenWidth / 320;
    }
}
-(NSURL *)returenUrlWithStr:(NSString *)str{
    
    
    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@",IPStr,str]];
    
    return url;
}

-(NSString *)returnNoNullStrWith:(NSString *)str{
    
    if ([str isKindOfClass:[NSNull class]] || [str isEqual:[NSNull null]] || [str isEqual:@"(null)"] || str == nil) {
        return @"";
    }else{
        return str;
    }
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
